import instance from '@/util/api'
//下载
// export const downloadFileByFileId = (fileId) => {
//   return instance.get('/down/downLoadFileByFileId', {
//     params: {
//       fileId
//     }
//   })
// }
//

//删除==>二次删除时永久删除
export const deleteFileByFileId = (fileId) => {
  return instance.delete('/down/deleteFileByFileId', {
    params: {
      fileId
    }
  })
}

//批量删除

export const batchDeleteFileByFileIds = (fileIds) => {
  return instance.delete('/down/batchDeleteFileByFileIds', {
    data: fileIds
  })
}

//重命名

export const renameByFileId = (fileId, newName) => {
  return instance.put('/down/renameByFileId', {
    fileId,
    newName
  })
}

//回收站
export const getRecycleFileList = (userId) => {
  return instance.get('/down/selectRecycleBin', {
    params: {
      userId
    }
  })
}

//取消删除
export const reductionByFileId = (fileId) => {
  return instance.put('/down/reductionByFileId', {
    fileId
  })
}
//永久删除
